(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 7.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[     30756,        820]
NotebookOptionsPosition[     28889,        754]
NotebookOutlinePosition[     29284,        771]
CellTagsIndexPosition[     29241,        768]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["\:0424\:0443\:043d\:043a\:0446\:0438\:0438", "Subsection",
 CellChangeTimes->{{3.4483427652046003`*^9, 3.448342768231*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"ReadSnapHeader", "[", "fname_String", "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "ReadTilleq", ",", "fin", ",", "t", ",", "count", ",", "np", ",", "n1", 
      ",", "n2", ",", "n3", ",", "Rey", ",", "a", ","}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"ReadTilleq", "[", 
       RowBox[{"stream_", ",", "type_", ",", "opts1___"}], "]"}], ":=", 
      RowBox[{"Block", "[", 
       RowBox[{
        RowBox[{"{", "}"}], ",", "\n", "\t\t", 
        RowBox[{
         RowBox[{"Skip", "[", 
          RowBox[{"stream", ",", "Record", ",", 
           RowBox[{"RecordSeparators", "->", 
            RowBox[{"{", "\"\<=\>\"", "}"}]}]}], "]"}], ";", 
         RowBox[{"Skip", "[", 
          RowBox[{"stream", ",", "Character"}], "]"}], ";", 
         RowBox[{"Return", "[", 
          RowBox[{"Read", "[", 
           RowBox[{"stream", ",", "type", ",", "opts1"}], "]"}], "]"}], 
         ";"}]}], "\n", "\t\t", "]"}]}], ";", "\n", "\t", 
     RowBox[{"fin", "=", 
      RowBox[{"OpenRead", "[", 
       RowBox[{"fname", ",", 
        RowBox[{"BinaryFormat", "->", "True"}]}], "]"}]}], ";", "\n", "\t", 
     RowBox[{"t", " ", "=", " ", 
      RowBox[{"ReadTilleq", "[", 
       RowBox[{"fin", ",", " ", "Real"}], "]"}]}], ";", "\n", "\t", 
     RowBox[{"count", " ", "=", " ", 
      RowBox[{"ReadTilleq", "[", 
       RowBox[{"fin", ",", " ", "Number"}], "]"}]}], ";", "\n", "\t", 
     RowBox[{"np", " ", "=", " ", 
      RowBox[{"ToExpression", "[", 
       RowBox[{"ReadTilleq", "[", 
        RowBox[{"fin", ",", " ", "Record", ",", " ", 
         RowBox[{"RecordSeparators", "->", 
          RowBox[{"{", "\"\<\\n\>\"", "}"}]}]}], "]"}], "]"}]}], ";", "\n", 
     "\t", 
     RowBox[{"KolProc", " ", "=", " ", 
      RowBox[{"Times", "@@", "np"}]}], ";", "\n", "\t", 
     RowBox[{"n1", " ", "=", " ", 
      RowBox[{"ReadTilleq", "[", 
       RowBox[{"fin", ",", " ", "Number"}], "]"}]}], ";", "\n", "\t", 
     RowBox[{"n2", " ", "=", " ", 
      RowBox[{"ReadTilleq", "[", 
       RowBox[{"fin", ",", " ", "Number"}], "]"}]}], ";", "\n", "\t", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", "$2d"}], ",", 
       RowBox[{"n3", " ", "=", " ", 
        RowBox[{"ReadTilleq", "[", 
         RowBox[{"fin", ",", " ", "Number"}], "]"}]}]}], "]"}], ";", "\n", 
     "\t", 
     RowBox[{"Rey", " ", "=", " ", 
      RowBox[{"ReadTilleq", "[", 
       RowBox[{"fin", ",", " ", "Real"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Close", "[", "fin", "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"t", ",", "count", ",", "np", ",", 
       RowBox[{"{", 
        RowBox[{"n1", ",", "n2", ",", "n3"}], "}"}], ",", "Rey"}], "}"}]}]}], 
   "\n", "\t", "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.448177189078125*^9, 3.44817721646875*^9}, {
  3.448254314171875*^9, 3.4482543955625*^9}, {3.448254428140625*^9, 
  3.44825452065625*^9}, {3.5051194333223686`*^9, 3.5051194410911703`*^9}, {
  3.5051195488715916`*^9, 3.5051195656883945`*^9}, {3.53812895284375*^9, 
  3.53812895303125*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"ReadZipSnapHeader", "[", "fname_String", "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"temp", ",", "out"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"name", "=", 
      RowBox[{"StringReplace", "[", 
       RowBox[{"fname", ",", 
        RowBox[{"\"\<.zip\>\"", "\[Rule]", "\"\<\>\""}]}], "]"}]}], 
     RowBox[{"(*", 
      RowBox[{"<>", "\"\<.snp\>\""}], "*)"}], ";", "\[IndentingNewLine]", 
     RowBox[{"temp", "=", 
      RowBox[{"First", "[", 
       RowBox[{"Import", "[", 
        RowBox[{"fname", ",", 
         RowBox[{"{", 
          RowBox[{"\"\<*.snp\>\"", ",", "\"\<Binary\>\""}], "}"}]}], "]"}], 
       "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Export", "[", 
      RowBox[{"name", ",", "temp", ",", "\"\<Binary\>\"", ",", 
       RowBox[{"\"\<DataFormat\>\"", "\[Rule]", " ", "\"\<Byte\>\""}]}], 
      "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"out", "=", 
      RowBox[{"ReadSnapHeader", "[", "name", "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"Close", "[", "name", "]"}], ";"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"DeleteFile", "[", "name", "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"Return", "[", "out", "]"}]}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.46649260318125*^9, 3.4664927060875*^9}, {
  3.4664927689*^9, 3.466492784634375*^9}, {3.466493239571875*^9, 
  3.4664932450875*^9}}],

Cell[BoxData[
 RowBox[{"ScanSnaps", ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "files", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"$ZIP", "===", "True"}], ",", 
       RowBox[{"files", "=", 
        RowBox[{"FileNames", "[", "\"\<*.snp.zip\>\"", "]"}]}], ",", 
       RowBox[{"files", "=", 
        RowBox[{"FileNames", "[", "\"\<*.snp\>\"", "]"}]}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"Length", "[", "files", "]"}], "\[Equal]", "0"}], ",", 
       RowBox[{
        RowBox[{
        "Print", "[", 
         "\"\<\:0424\:0430\:0439\:043b\:043e\:0432 \:043d\:0435 \:043d\:0430\
\:0439\:0434\:0435\:043d\:043e\>\"", "]"}], ";", 
        RowBox[{"Return", "[", 
         RowBox[{"{", "}"}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"$ZIP", "===", "True"}], ",", "\[IndentingNewLine]", 
       RowBox[{"info", "=", 
        RowBox[{"ReadZipSnapHeader", "/@", "files"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"info", "=", 
        RowBox[{"ReadSnapHeader", "/@", "files"}]}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"Length", "[", 
         RowBox[{"Union", "[", 
          RowBox[{"info", "\[LeftDoubleBracket]", 
           RowBox[{"All", ",", "4"}], "\[RightDoubleBracket]"}], "]"}], "]"}],
         "\[Equal]", "1"}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Print", "[", 
         RowBox[{
         "\"\<\:0421\:0435\:0442\:043a\:0430 \:043e\:0434\:0438\:043d\:0430\
\:043a\:043e\:0432\:0430\:044f: \>\"", ",", 
          RowBox[{"info", "\[LeftDoubleBracket]", 
           RowBox[{"1", ",", "4"}], "\[RightDoubleBracket]"}]}], "]"}], ";", 
        "\[IndentingNewLine]", 
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"Length", "[", 
            RowBox[{"Union", "[", 
             RowBox[{"info", "[", 
              RowBox[{"[", 
               RowBox[{"All", ",", "3"}], "]"}], "]"}], "]"}], "]"}], 
           "\[Equal]", "1"}], ",", "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{"Print", "[", 
            RowBox[{
            "\"\<\:0414\:0435\:043b\:0435\:043d\:0438\:0435 \:043d\:0430 \
\:043f\:0440\:043e\:0446\:0435\:0441\:0441\:044b \:043e\:0434\:0438\:043d\
\:0430\:043a\:043e\:0432\:043e\:0435: \>\"", ",", 
             RowBox[{"info", "\[LeftDoubleBracket]", 
              RowBox[{"1", ",", "3"}], "\[RightDoubleBracket]"}]}], "]"}], 
           ";", "\[IndentingNewLine]", 
           RowBox[{
           "Print", "[", 
            "\"\<\:0421\:0442\:0440\:0443\:043a\:0442\:0443\:0440\:0430 \
\:0443 \:0432\:0441\:0435\:0445 \:043e\:0434\:0438\:043d\:0430\:043a\:043e\
\:0432\:0430\:044f\>\"", "]"}], ";", 
           RowBox[{"Return", "[", 
            RowBox[{"info", "\[LeftDoubleBracket]", 
             RowBox[{"All", ",", 
              RowBox[{"{", 
               RowBox[{"1", ",", "2", ",", "5"}], "}"}]}], 
             "\[RightDoubleBracket]"}], "]"}]}], ",", "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{
            RowBox[{
             RowBox[{"Print", "[", 
              RowBox[{
              "\"\<\\t\:0414\:043b\:044f \:0434\:0435\:043b\:0435\:043d\:0438\
\:044f \>\"", ",", "#", ",", 
               "\"\< \:0435\:0441\:0442\:044c \:0441\:043d\:0438\:043c\:043a\
\:0438:\\n\>\"", ",", 
               RowBox[{"info", "\[LeftDoubleBracket]", 
                RowBox[{
                 RowBox[{"First", "/@", 
                  RowBox[{"Position", "[", 
                   RowBox[{"info", ",", "#"}], "]"}]}], ",", 
                 RowBox[{"{", 
                  RowBox[{"1", ",", "2", ",", "5"}], "}"}]}], 
                "\[RightDoubleBracket]"}]}], "]"}], "&"}], "/@", 
            RowBox[{"Union", "[", 
             RowBox[{"info", "[", 
              RowBox[{"[", 
               RowBox[{"All", ",", "3"}], "]"}], "]"}], "]"}]}], ";"}]}], 
         "]"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Map", "[", 
         RowBox[{
          RowBox[{"Function", "[", 
           RowBox[{"mesh", ",", "\[IndentingNewLine]", 
            RowBox[{"If", "[", 
             RowBox[{
              RowBox[{
               RowBox[{"Length", "[", 
                RowBox[{"Union", "[", 
                 RowBox[{"info", "[", 
                  RowBox[{"[", 
                   RowBox[{
                    RowBox[{"First", "/@", 
                    RowBox[{"Position", "[", 
                    RowBox[{"info", ",", "mesh"}], "]"}]}], ",", "3"}], "]"}],
                   "]"}], "]"}], "]"}], "\[Equal]", "1"}], ",", 
              "\[IndentingNewLine]", 
              RowBox[{"Print", "[", 
               RowBox[{
               "\"\<\:0414\:043b\:044f \:0441\:0435\:0442\:043a\:0438 \>\"", 
                ",", "mesh", ",", 
                "\"\< \:0434\:0435\:043b\:0435\:043d\:0438\:0435 \:043d\:0430 \
\:043f\:0440\:043e\:0446\:0435\:0441\:0441\:044b \:043e\:0434\:0438\:043d\
\:0430\:043a\:043e\:0432\:043e\:0435: \>\"", ",", 
                RowBox[{"info", "\[LeftDoubleBracket]", 
                 RowBox[{
                  RowBox[{
                   RowBox[{"Position", "[", 
                    RowBox[{"info", ",", "mesh"}], "]"}], 
                   "\[LeftDoubleBracket]", 
                   RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], ",", 
                  "3"}], "\[RightDoubleBracket]"}], ",", " ", 
                "\"\< \:0438 \:0435\:0441\:0442\:044c \
\:0441\:043d\:0438\:043c\:043a\:0438:\\n\>\"", ",", 
                RowBox[{"info", "\[LeftDoubleBracket]", 
                 RowBox[{
                  RowBox[{"First", "/@", 
                   RowBox[{"Position", "[", 
                    RowBox[{"info", ",", "mesh"}], "]"}]}], ",", 
                  RowBox[{"{", 
                   RowBox[{"1", ",", "2", ",", "5"}], "}"}]}], 
                 "\[RightDoubleBracket]"}]}], "]"}], ",", 
              "\[IndentingNewLine]", 
              RowBox[{
               RowBox[{"Print", "[", 
                RowBox[{
                "\"\<\:0414\:043b\:044f \:0441\:0435\:0442\:043a\:0438 \>\"", 
                 ",", "mesh", ",", 
                 "\"\< \:0435\:0441\:0442\:044c \
\:043d\:0435\:0441\:043a\:043e\:043b\:044c\:043a\:043e \:0434\:0435\:043b\
\:0435\:043d\:0438\:0439 \:043d\:0430 \:043f\:0440\:043e\:0446\:0435\:0441\
\:0441\:044b:\>\""}], "]"}], ";", "\[IndentingNewLine]", 
               RowBox[{
                RowBox[{
                 RowBox[{"Print", "[", 
                  RowBox[{
                  "\"\<\\t\:0414\:043b\:044f \:0434\:0435\:043b\:0435\:043d\
\:0438\:044f \>\"", ",", "#", ",", 
                   "\"\< \:0435\:0441\:0442\:044c \:0441\:043d\:0438\:043c\
\:043a\:0438:\\n\>\"", ",", 
                   RowBox[{"info", "\[LeftDoubleBracket]", 
                    RowBox[{
                    RowBox[{"Intersection", "[", 
                    RowBox[{
                    RowBox[{"First", "/@", 
                    RowBox[{"Position", "[", 
                    RowBox[{"info", ",", "mesh"}], "]"}]}], ",", 
                    RowBox[{"First", "/@", 
                    RowBox[{"Position", "[", 
                    RowBox[{"info", ",", "#"}], "]"}]}]}], "]"}], ",", 
                    RowBox[{"{", 
                    RowBox[{"1", ",", "2", ",", "5"}], "}"}]}], 
                    "\[RightDoubleBracket]"}]}], "]"}], "&"}], "/@", 
                RowBox[{"Union", "[", 
                 RowBox[{"info", "[", 
                  RowBox[{"[", 
                   RowBox[{"All", ",", "3"}], "]"}], "]"}], "]"}]}]}]}], 
             "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}], 
          ",", 
          RowBox[{"Union", "[", 
           RowBox[{"info", "[", 
            RowBox[{"[", 
             RowBox[{"All", ",", "4"}], "]"}], "]"}], "]"}]}], 
         "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], 
     ";", "\[IndentingNewLine]", 
     SuperscriptBox["info", "\[Transpose]"]}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.448254669203125*^9, 3.448254679140625*^9}, {
   3.4482547925625*^9, 3.448254841265625*^9}, {3.448254909953125*^9, 
   3.44825496153125*^9}, {3.448255090984375*^9, 3.44825515803125*^9}, {
   3.448258054265625*^9, 3.448258112375*^9}, {3.448260943359375*^9, 
   3.448260943546875*^9}, {3.448260980453125*^9, 3.4482611255625*^9}, {
   3.44826532303125*^9, 3.448265328609375*^9}, {3.4482654054375*^9, 
   3.448265625265625*^9}, {3.44826610728125*^9, 3.4482661775625*^9}, {
   3.448266268921875*^9, 3.44826645521875*^9}, {3.448266488296875*^9, 
   3.448266510125*^9}, {3.448266541578125*^9, 3.448266581484375*^9}, {
   3.448267824125*^9, 3.44826788615625*^9}, 3.44826792965625*^9, {
   3.448267967296875*^9, 3.44826800034375*^9}, {3.4664928372125*^9, 
   3.466493042728125*^9}, {3.46649324805625*^9, 3.46649324974375*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["\:041f\:0440\:043e\:0446\:0435\:0441\:0441", "Subsection",
 CellChangeTimes->{{3.4483427738626003`*^9, 3.4483427747518*^9}}],

Cell[BoxData[
 RowBox[{"ReadZipSnapHeader", "[", "\"\<screw_64_1020.snp.zip\>\"", 
  "]"}]], "Input",
 CellChangeTimes->{{3.448254553796875*^9, 3.4482545675625*^9}, {
  3.448254611703125*^9, 3.448254632109375*^9}, {3.466493116728125*^9, 
  3.4664931292125*^9}}],

Cell[BoxData[
 RowBox[{"ReadSnapHeader", "[", "\"\<screw_2_187.snp\>\"", "]"}]], "Input",
 CellChangeTimes->{{3.448254553796875*^9, 3.4482545675625*^9}, {
  3.448254611703125*^9, 3.448254632109375*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"$ZIP", "=", "False"}], ";", 
  RowBox[{"DynamicModule", "[", 
   RowBox[{
    RowBox[{"{", "}"}], ",", 
    RowBox[{"Button", "[", 
     RowBox[{
      RowBox[{"Dynamic", "[", 
       RowBox[{"\"\<Use zipped files? \>\"", "<>", 
        RowBox[{"ToString", "@", "$ZIP"}]}], "]"}], ",", 
      RowBox[{"$ZIP", "=", 
       RowBox[{"!", "$ZIP"}]}]}], "]"}]}], "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.46649288961875*^9, 3.46649289180625*^9}, {
  3.46649292624375*^9, 3.46649292693125*^9}, {3.46649299415*^9, 
  3.46649299461875*^9}, {3.466493812040625*^9, 3.466493812540625*^9}, {
  3.538125869328125*^9, 3.53812587084375*^9}, {3.539332829879875*^9, 
  3.539332832098625*^9}}],

Cell[BoxData[
 DynamicModuleBox[{}, 
  ButtonBox[
   DynamicBox[ToBoxes[
     StringJoin["Use zipped files? ", 
      ToString[$CellContext`$ZIP]], StandardForm],
    ImageSizeCache->{109., {2., 9.}}],
   Appearance->Automatic,
   ButtonFunction:>($CellContext`$ZIP = Not[$CellContext`$ZIP]),
   Evaluator->Automatic,
   Method->"Preemptive"],
  DynamicModuleValues:>{}]], "Output",
 CellChangeTimes->{{3.539332840223625*^9, 3.539332840348625*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"$2d", "=", "True"}], ";", 
  RowBox[{"DynamicModule", "[", 
   RowBox[{
    RowBox[{"{", "}"}], ",", 
    RowBox[{"Button", "[", 
     RowBox[{
      RowBox[{"Dynamic", "[", 
       RowBox[{"\"\<Use 2d images? \>\"", "<>", 
        RowBox[{"ToString", "@", "$2d"}]}], "]"}], ",", 
      RowBox[{"$2d", "=", 
       RowBox[{"!", "$2d"}]}]}], "]"}]}], "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.505119574517997*^9, 3.5051195789327974`*^9}, {
   3.5051196167472053`*^9, 3.505119617340005*^9}, 3.539332837458*^9}],

Cell[BoxData[
 DynamicModuleBox[{}, 
  ButtonBox[
   DynamicBox[ToBoxes[
     StringJoin["Use 2d images? ", 
      ToString[$CellContext`$2d]], StandardForm],
    ImageSizeCache->{103., {2., 9.}}],
   Appearance->Automatic,
   ButtonFunction:>($CellContext`$2d = Not[$CellContext`$2d]),
   Evaluator->Automatic,
   Method->"Preemptive"],
  DynamicModuleValues:>{}]], "Output",
 CellChangeTimes->{3.53933284023925*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"infos", "=", "ScanSnaps"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Prepend", "[", 
   RowBox[{"infos", ",", 
    RowBox[{"{", 
     RowBox[{
     "\"\<Time\>\"", ",", "\"\<Iteration\>\"", ",", "\"\<Reynolds\>\""}], 
     "}"}]}], "]"}], "//", "TableForm"}]}], "Input",
 CellChangeTimes->{{3.5053544397718687`*^9, 3.50535444364067*^9}, {
  3.5381258326875*^9, 3.5381258333125*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"infos", "=", 
   RowBox[{"SortBy", "[", 
    RowBox[{"ScanSnaps", ",", 
     RowBox[{
      RowBox[{"#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
      "&"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Prepend", "[", 
   RowBox[{"infos", ",", 
    RowBox[{"{", 
     RowBox[{
     "\"\<Time\>\"", ",", "\"\<Iteration\>\"", ",", "\"\<Reynolds\>\""}], 
     "}"}]}], "]"}], "//", "TableForm"}]}], "Input",
 CellChangeTimes->{{3.448254848171875*^9, 3.448254849859375*^9}, {
  3.46043661084375*^9, 3.46043661353125*^9}, {3.46253371921875*^9, 
  3.46253373046875*^9}, {3.53812583946875*^9, 3.53812583984375*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"\:0421\:0435\:0442\:043a\:0430 \:043e\:0434\:0438\:043d\:0430\
\:043a\:043e\:0432\:0430\:044f: \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"512", ",", "512", ",", "n3"}], "}"}]}],
  SequenceForm[
  "\:0421\:0435\:0442\:043a\:0430 \:043e\:0434\:0438\:043d\:0430\:043a\:043e\
\:0432\:0430\:044f: ", {512, 512, $CellContext`n3}],
  Editable->False]], "Print",
 CellChangeTimes->{3.539332845536125*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"\:0414\:0435\:043b\:0435\:043d\:0438\:0435 \:043d\:0430 \:043f\
\:0440\:043e\:0446\:0435\:0441\:0441\:044b \:043e\:0434\:0438\:043d\:0430\
\:043a\:043e\:0432\:043e\:0435: \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"16", ",", "16"}], "}"}]}],
  SequenceForm[
  "\:0414\:0435\:043b\:0435\:043d\:0438\:0435 \:043d\:0430 \:043f\:0440\:043e\
\:0446\:0435\:0441\:0441\:044b \:043e\:0434\:0438\:043d\:0430\:043a\:043e\
\:0432\:043e\:0435: ", {16, 16}],
  Editable->False]], "Print",
 CellChangeTimes->{3.539332845536125*^9}],

Cell[BoxData["\<\"\:0421\:0442\:0440\:0443\:043a\:0442\:0443\:0440\:0430 \
\:0443 \:0432\:0441\:0435\:0445 \:043e\:0434\:0438\:043d\:0430\:043a\:043e\
\:0432\:0430\:044f\"\>"], "Print",
 CellChangeTimes->{3.539332845536125*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Union", "[", 
  RowBox[{"Last", "/@", "infos"}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "10.`", ",", "20.`", ",", "30.`", ",", "40.`", ",", "50.`", ",", "60.`", 
   ",", "70.`", ",", "80.`", ",", "90.`", ",", "100.`", ",", "110.`", ",", 
   "120.`", ",", "130.`", ",", "140.`", ",", "150.`", ",", "160.`", ",", 
   "170.`", ",", "180.`", ",", "190.`", ",", "200.`"}], "}"}]], "Output",
 CellChangeTimes->{3.5360461059471316`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"Position", "[", 
     RowBox[{"infos", ",", 
      RowBox[{"{", 
       RowBox[{"_", ",", "_", ",", "#"}], "}"}], ",", "1"}], "]"}], 
    "\[LeftDoubleBracket]", 
    RowBox[{"-", "1"}], "\[RightDoubleBracket]"}], "&"}], "/@", 
  RowBox[{"Union", "[", 
   RowBox[{"Last", "/@", "infos"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.463476041828125*^9, 3.463476153296875*^9}, {
  3.48645101055925*^9, 3.486451016012375*^9}, {3.486451713653*^9, 
  3.486451714012375*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", "4", "}"}], ",", 
   RowBox[{"{", "8", "}"}], ",", 
   RowBox[{"{", "12", "}"}], ",", 
   RowBox[{"{", "16", "}"}], ",", 
   RowBox[{"{", "20", "}"}], ",", 
   RowBox[{"{", "24", "}"}], ",", 
   RowBox[{"{", "28", "}"}], ",", 
   RowBox[{"{", "32", "}"}], ",", 
   RowBox[{"{", "36", "}"}], ",", 
   RowBox[{"{", "40", "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.463476092703125*^9, 3.463476119421875*^9}, 
   3.463476154453125*^9, 3.46371473875*^9, 3.464414782578125*^9, 
   3.466492350696875*^9, 3.4664931912125*^9, 3.466493327509375*^9, 
   3.466493822525*^9, 3.466493878165625*^9, 3.486450510731125*^9, 
   3.486451016293625*^9, 3.486451714449875*^9, 3.486452223356125*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"MapThread", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"ListPlot", "[", 
     RowBox[{"#1", ",", 
      RowBox[{"PlotLabel", "\[Rule]", "#2"}]}], "]"}], "&"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"CutList", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"Union", "[", "infos", "]"}], "\[Transpose]"}], ",", "100"}], 
      "]"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "\"\<Time\>\"", ",", "\"\<Iteration\>\"", ",", "\"\<Reynolds\>\""}], 
      "}"}]}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.460436672109375*^9, 3.46043674634375*^9}, {
  3.460436776546875*^9, 3.460436778875*^9}, {3.462524698984375*^9, 
  3.462524743890625*^9}, {3.466492374446875*^9, 3.466492388634375*^9}}],

Cell[BoxData[
 RowBox[{"dellist", "=", 
  RowBox[{"ToString", "/@", 
   RowBox[{"Complement", "[", 
    RowBox[{
     RowBox[{"infos", "[", 
      RowBox[{"[", 
       RowBox[{"All", ",", "2"}], "]"}], "]"}], ",", 
     RowBox[{
      RowBox[{
       RowBox[{"#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
       "&"}], "/@", 
      RowBox[{"Extract", "[", 
       RowBox[{"infos", ",", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"Position", "[", 
            RowBox[{"infos", ",", 
             RowBox[{"{", 
              RowBox[{"_", ",", "_", ",", "#"}], "}"}], ",", "1"}], "]"}], 
           "\[LeftDoubleBracket]", 
           RowBox[{"-", "1"}], "\[RightDoubleBracket]"}], "&"}], "/@", 
         RowBox[{"Union", "[", 
          RowBox[{"Last", "/@", "infos"}], "]"}]}]}], "]"}]}]}], 
    "]"}]}]}]], "Input",
 CellChangeTimes->{
  3.486451019637375*^9, {3.4864514224655*^9, 3.486451423481125*^9}, 
   3.48645219255925*^9, {3.5381291108125*^9, 3.5381291130625*^9}}],

Cell[BoxData[
 RowBox[{"dellist", "=", 
  RowBox[{"Flatten", "[", 
   RowBox[{"Most", "/@", 
    RowBox[{"Last", "/@", "cs"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.53838273284375*^9, 3.5383827754375*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Last", "/@", 
  RowBox[{"Last", "/@", "cs"}]}]], "Input",
 CellChangeTimes->{{3.53838421071875*^9, 3.538384214203125*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"46178\"\>", ",", "\<\"1518971\"\>", ",", "\<\"1610732\"\>", 
   ",", "\<\"1595579\"\>", ",", "\<\"1506504\"\>", ",", "\<\"1480517\"\>", 
   ",", "\<\"1486283\"\>", ",", "\<\"1534854\"\>", ",", "\<\"1643192\"\>"}], 
  "}"}]], "Output",
 CellChangeTimes->{3.53838421446875*^9, 3.538389461296875*^9, 
  3.53873791896875*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"dellist", "=", 
  RowBox[{"Complement", "[", 
   RowBox[{
    RowBox[{"infos", "[", 
     RowBox[{"[", 
      RowBox[{"All", ",", "2"}], "]"}], "]"}], ",", 
    RowBox[{"CutList", "[", 
     RowBox[{
      RowBox[{"infos", "[", 
       RowBox[{"[", 
        RowBox[{"All", ",", "2"}], "]"}], "]"}], ",", "100"}], "]"}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.48645143905925*^9, 3.486451440653*^9}, 
   3.536046153931506*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"CreateDirectory", "[", 
   RowBox[{"$dir", "=", 
    RowBox[{"ToString", "[", 
     RowBox[{"Unique", "[", "]"}], "]"}]}], "]"}], ";", 
  RowBox[{
   RowBox[{
    RowBox[{"RenameFile", "[", 
     RowBox[{
      RowBox[{"$name", "=", 
       RowBox[{"\"\<pumpflow_\>\"", "<>", 
        RowBox[{"ToString", "[", "KolProc", "]"}], "<>", "\"\<_\>\"", "<>", 
        RowBox[{"PadLeft", "[", 
         RowBox[{
          RowBox[{"Characters", "[", "#", "]"}], ",", 
          RowBox[{"Max", "[", 
           RowBox[{
            RowBox[{"StringLength", "[", "#", "]"}], ",", "4"}], "]"}], ",", 
          "\"\<0\>\""}], "]"}], "<>", "\"\<.snp\>\""}]}], ",", 
      RowBox[{"$dir", "<>", "\"\</\>\"", "<>", "$name"}]}], "]"}], "&"}], "/@",
    "dellist"}], ";"}]], "Input",
 CellChangeTimes->{{3.46649242549375*^9, 3.466492447525*^9}, {
   3.46649252415*^9, 3.46649256461875*^9}, {3.486450880606125*^9, 
   3.486450906012375*^9}, {3.486451429012375*^9, 3.486451436543625*^9}, {
   3.4864516053405*^9, 3.486451627012375*^9}, {3.486452201528*^9, 
   3.486452207028*^9}, {3.5360461785096316`*^9, 3.5360461811658816`*^9}, 
   3.536046218525256*^9, {3.538128698109375*^9, 3.538128700734375*^9}, {
   3.538128733953125*^9, 3.538128765078125*^9}, {3.538128816421875*^9, 
   3.5381288545*^9}, {3.538128968859375*^9, 3.538128974375*^9}, {
   3.538129083421875*^9, 3.538129089015625*^9}, {3.538129121265625*^9, 
   3.538129122890625*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"prefix1", "=", 
        RowBox[{"\"\<pumpflow_\>\"", "<>", 
         RowBox[{"ToString", "[", "KolProc", "]"}], "<>", "\"\<_\>\""}]}], 
       ",", "prefix2"}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"prefix2", "=", "\"\<pumpflow\>\""}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"RenameFile", "[", 
       RowBox[{
        RowBox[{"prefix1", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{"#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}],
           "]"}], "<>", "\"\<.snp\>\""}], ",", 
        RowBox[{"prefix2", "<>", "\"\<Re\>\"", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{"Round", "[", 
           RowBox[{
           "#", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], "]"}],
           "]"}], "<>", "\"\<.snp\>\""}]}], "]"}]}]}], "]"}], "&"}], "/@", 
  "infos"}]], "Input",
 CellChangeTimes->{{3.5360465354158816`*^9, 3.536046718056506*^9}, 
   3.536046998400256*^9, {3.53812902159375*^9, 3.538129030296875*^9}, {
   3.538129189734375*^9, 3.538129206703125*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"prefix1", "=", 
        RowBox[{"\"\<pumpflow_\>\"", "<>", 
         RowBox[{"ToString", "[", "KolProc", "]"}], "<>", "\"\<_\>\""}]}], 
       ",", "prefix2"}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"prefix2", "=", "\"\<pumpflow\>\""}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"RenameFile", "[", 
       RowBox[{
        RowBox[{"prefix1", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{"#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}],
           "]"}], "<>", "\"\<.snp\>\""}], ",", 
        RowBox[{"prefix2", "<>", "\"\<(\>\"", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{"CutNumber", "[", 
           RowBox[{
            RowBox[{"ToExpression", "[", 
             RowBox[{"cs", "\[LeftDoubleBracket]", 
              RowBox[{
               RowBox[{
                RowBox[{"Position", "[", 
                 RowBox[{"cs", ",", 
                  RowBox[{"ToString", "@", 
                   RowBox[{
                   "#", "\[LeftDoubleBracket]", "2", 
                    "\[RightDoubleBracket]"}]}]}], "]"}], 
                "\[LeftDoubleBracket]", 
                RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], ",", "1", 
               ",", "1"}], "\[RightDoubleBracket]"}], "]"}], ",", "2"}], 
           "]"}], "]"}], "<>", "\"\<).snp\>\""}]}], "]"}]}]}], "]"}], "&"}], "/@",
   "infos"}]], "Input",
 CellChangeTimes->{{3.53838383390625*^9, 3.538383845421875*^9}}]
}, Open  ]]
},
AutoGeneratedPackage->None,
WindowSize->{1040, 658},
WindowMargins->{{80, Automatic}, {Automatic, 89}},
ShowSelection->True,
FrontEndVersion->"8.0 for Microsoft Windows (32-bit) (February 23, 2011)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[567, 22, 129, 1, 36, "Subsection"],
Cell[699, 25, 3163, 74, 332, "Input",
 InitializationCell->True],
Cell[3865, 101, 1546, 38, 192, "Input",
 InitializationCell->True],
Cell[5414, 141, 9090, 201, 527, "Input",
 InitializationCell->True]
}, Closed]],
Cell[CellGroupData[{
Cell[14541, 347, 130, 1, 28, "Subsection"],
Cell[14674, 350, 261, 5, 31, "Input"],
Cell[14938, 357, 202, 3, 31, "Input"],
Cell[CellGroupData[{
Cell[15165, 364, 736, 18, 31, "Input",
 InitializationCell->True],
Cell[15904, 384, 448, 12, 40, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[16389, 401, 569, 15, 31, "Input",
 InitializationCell->True],
Cell[16961, 418, 417, 12, 40, "Output"]
}, Open  ]],
Cell[17393, 433, 429, 11, 52, "Input"],
Cell[CellGroupData[{
Cell[17847, 448, 679, 17, 52, "Input"],
Cell[CellGroupData[{
Cell[18551, 469, 461, 10, 23, "Print"],
Cell[19015, 481, 581, 12, 23, "Print"],
Cell[19599, 495, 227, 3, 23, "Print"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[19875, 504, 89, 2, 31, "Input"],
Cell[19967, 508, 383, 7, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[20387, 520, 527, 14, 31, "Input"],
Cell[20917, 536, 738, 17, 30, "Output"]
}, Open  ]],
Cell[21670, 556, 733, 20, 31, "Input"],
Cell[22406, 578, 1018, 28, 31, "Input"],
Cell[23427, 608, 210, 5, 31, "Input"],
Cell[CellGroupData[{
Cell[23662, 617, 146, 3, 31, "Input"],
Cell[23811, 622, 365, 7, 30, "Output"]
}, Open  ]],
Cell[24191, 632, 456, 14, 31, "Input"],
Cell[24650, 648, 1456, 31, 72, "Input"],
Cell[26109, 681, 1177, 29, 72, "Input"],
Cell[27289, 712, 1584, 39, 112, "Input"]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
